﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_form/Menu/dao_tao.master" AutoEventWireup="true" CodeFile="dm_truong.aspx.cs" Inherits="App_form_Danh_muc_dm_truong" %>

<%@ Register TagPrefix="Control" TagName="menu_phai" Src="~/App_ctr/Admin/menu_phai.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 100%">
        <div style="width: 20%; float: left;">
            <Control:menu_phai runat="server" ID="menuphai" />
        </div>
        <div style="width: 79.4%; float: right;">
            <div style="background-image: url(../../CSS/images/ui-bg_glass_75_e6e6e6_1x400.png); font-weight: bold; height: 30px; border: 1px solid #d3d3d3; margin-top: 4px; text-align: center; padding-top: 8px; text-transform: uppercase;">
                Thông tin chung
            </div>
            <div id="ndung" style="padding: 40px; margin-top: 2px;">
                <div style="display: table; margin: 0 auto; width: 80%; border: 1px solid #d3d3d3; font-size: 16px;">
                    <div style="background-image: url(../../Images/Hethong/back.gif); background-repeat: repeat-x; height: 30px;"></div>
                    <div style="padding: 20px;">
                        <div id="ndung_ct" runat="server">
                            <div style="width: 90%; float: left;">
                                <div style="float: left; width: 20%;">
                                    <label>
                                        Mã trường :
                                    </label>
                                </div>

                                <div>
                                    <Lib:textBox runat="server" ID="MA_TRUONG" Width="150px" UpperCase="true" Msg="mã trường" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        Tên trường :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="TEN" Width="312px" Msg="tên trường" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        SĐT :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="sdt" Width="150px" Type="Number" MaxLength="11" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        Địa chỉ :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="diachi" Width="312px" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        Email :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="email" Width="312px" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        Web :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="web" Width="313px" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                                <div style="float: left; width: 20%;">
                                    <label>
                                        HT :
                                    </label>
                                </div>
                                <div>
                                    <Lib:textBox runat="server" ID="hieu_truong" Width="314px" />
                                </div>
                                <div style="width: 100%; height: 6px;"></div>
                            </div>
                        </div>
                        <div style="width: 100%; height: 20px;"></div>
                        <div style="margin-left: 100px;">
                            <Lib:Button runat="server" ID="add" Text="Thêm mới" Width="100px" onClientClick="P_TT_TRUONG_NH()"></Lib:Button>
                            <Lib:Button runat="server" ID="new" Text="Mới" Width="100px" onClientClick="P_TT_TRUONG_MOI()"></Lib:Button>
                            <Lib:Button runat="server" ID="del" Text="Xóa" Width="100px" onClientClick="P_TT_TRUONG_XOA()"></Lib:Button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        function P_TT_TRUONG_NH() {
            try {
                var a_ct = GetAllValueForm("ndung_ct");
                wht_nsd.FDM_TT_TRUONG_NH(a_ct, P_TT_TRUONG_NH_KQ, ErrorDb, ErrorTimeOut);
            }
            catch (e) {
                ShowError(e.message);
            }
        }
        function P_TT_TRUONG_NH_KQ(b_kq) {
            if (CheckError(b_kq))
                return ShowError(b_kq);
        }

        
        //MỚI
        function P_TT_TRUONG_MOI() {
            ResetForm("ndung_ct");
        }

        //XÓA
        function P_TT_TRUONG_XOA() {
            try {
                var b_ma = $("#<%=MA_TRUONG.ClientID%>").val();
                if (Common.isNullOrEmty(b_ma)) {
                    Msg.Show("Thông báo", "Chưa chọn mục để xóa", "error");
                    return;
                }
                wht_nsd.FDM_TT_TRUONG_XOA(b_ma, P_TT_TRUONG_XOA_KQ, ErrorDb, ErrorTimeOut);
            }
            catch (e) {
                ShowError(e);
            }
        }
        function P_TT_TRUONG_XOA_KQ(b_kq) {
            if (CheckError(b_kq));
            {
                ShowError(b_kq);
                return;
            }
            P_TT_TRUONG_MOI();
        }
    </script>
    <asp:HiddenField ID="kthuoc" runat="server" Value="0,0" />
</asp:Content>

